package com.sinodata.bsm.center.util.system;

import java.util.Hashtable;

/**
 * 
 * <p>
 * Description:系统配置类，不同的子系统在启动的时候初始化该配置类 
 * </p>
 *
 * @author liulibo
 * @version 1.0

 * <p>
 * History: 
 *
 * Date                     Author         Version     Description
 * ---------------------------------------------------------------------------------
 * 2012-5-25 PM 9:28:36    liulibo        1.0         To create
 * </p>
 *
 * @since 
 * @see
 */
public class SystemContext {

    private static Hashtable<Object, Object> properties = new Hashtable<Object, Object>();

    /**
     * 获取本地配置属性值，用户使用时向下转型。
     * 
     * @param key
     *            Object
     * @return Object
     */
    public static Object getProperty(Object key) {
        return properties.get(key);
    }

    /**
     * 子系统初始化时根据本地的配置文件调用该方法初始化本地配置类
     * 
     * @param key
     *            Object
     * @param value
     *            Object
     */
    public static void setProperty(Object key, Object value) {
        if (key != null && value != null) {
            properties.put(key, value);
        }
    }

}
